package cn.knight.controller;

import cn.knight.dto.ProductDto;
import cn.knight.service.IProductServcie;
import cn.knight.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ProductCtrl {

    @Autowired
    private IProductServcie productServcie;

    @PostMapping("/product/save")
    public Result save(@RequestBody ProductDto productDto)  {
            return productServcie.save(productDto);

    }
}
